function test()
{
	var url = $.consts.root;
	var newurl = $.consts.mname +'/'+ $.consts.aname;
	alert (url);
}

function openwin(url) { 
	window.open(url,"","width=100%,height=100%");
} 


function usaction(form,action,gid,hash)
{
	var btnaction = "#" +action;
	$("#result").hide();
	var btnnow =parseInt($(btnaction).html());
	
	$.ajax({
		   type: "POST",
		   url: '/input/deal',
		   data: "id="+gid+"&type="+action+"&form=useraction&__hash__="+hash,
		   success: 
		   function(msg){
			 var obj = eval( "(" + msg + ")" );
			 $("#result").html(obj.data);
				 $("#result").slideDown("slow",function(){
					 if(obj.info)
					 {
						 $(btnaction+"list").append($("#userico").clone());
					 }
				 });
			 
		   }
		   
		});
		//reflash page 
		window.location.reload(); 
}

//post all the data to server
function doPost(form,content,hash)
{
	$.ajax({
		   type: "POST",
		   url: '/input/deal',
		   data: "content="+content+"&form="+form+"&__hash__="+hash,
		   success:
			//reflash page 
			window.location.reload()
		});
		
}




function clickaction(gid,url)
{
	$.ajax({
		   type: "POST",
		   url: '/input/deal',
		   data: "id="+gid+"&url="+url+"&module=showurl",
		   success: 
		   function(msg){
			 return true;
		   }
		});
	
}